public class sushu{
public static void main(String[] args) {
		int count = 0; 
		boolean flag;
		for (int i = 1; i <= 20000; i++) {
			flag = true;
			for (int j = 2; j < i; j++) {
				if (i % j == 0) { 
					flag = false;
				}
			}
			if (flag) {
				System.out.print(i + "\t");
				count++;
				if (count % 5 == 0) { 
					System.out.println();
				}
			}
		}
	}
}
